/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* E.P. Scene Graph
* Developed by:
*       - Eduardo Ribeiro (eribeiro @ tecgraf . puc-rio . br)
*       - Peter Dam (peter @ tecgraf . puc-rio . br)
* File: Entity.h
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */

#ifndef _EPSG_ENTITY_
#define _EPSG_ENTITY_

#include "EPSG/Leaf.h"
#include "EPSG/Prototypes.h"

namespace EPSG
{
	class Entity : public Leaf
	{
	public:
		/* [CONSTRUCTOR] */	Entity();
		/* [CONSTRUCTOR] */	Entity( EPSG::Appearance* appearance, EPSG::Shape* shape );

		virtual void		render();
		void				toonRender();

		void				setAppearance( EPSG::Appearance* a );
		void				setShape( EPSG::Shape* s );

		EPSG::Appearance*	getAppearance();
		EPSG::Shape*		getShape();

		void				setPolygonOffset( float factor, float units );
		void				setToonShading( bool toonShading );
		void				setToonBorderWidth( float width );
		void				setToonBorderColor( float r, float g, float b, float a );

	protected:
		EPSG::Appearance*	_appearance;
		EPSG::Shape*		_shape;
		bool				_polygonOffset;
		bool				_toonShading;
		float				_factor;
		float				_units;
		float				_lineColor[4];
		float				_lineWidth;
	};
}

#endif //_EPSG_ENTITY_